﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="F510.aspx.cs" Inherits="F510" %>
<%@ Register Src="WebControls/TreeViewControl.ascx" TagName="TreeViewControl" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<script type="text/javascript" src="Javascript/jquery.js"></script>
<script type="text/javascript" src="Javascript/datetimepicker_css.js"></script>
<script type ="text/javascript">
    function CheckValidateVersion() {

        var sanpham = $('#ctl00_ContentPlaceHolder1_cboSanPham').val();
        var phienban = $('#ctl00_ContentPlaceHolder1_cboPhienBan').val();
        var ngaycap = $('#ctl00_ContentPlaceHolder1_txtNgayCap').val();

        if (sanpham == '') {
            alert('Bạn phải nhập tên môn học!');
            return false;
        }

        if (ngaycap == '') {
            alert('Bạn phải nhập ngày cấp!');
            return false;
        }

        return true;
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <table cellspacing="0" cellpadding="2" style="width: 100%;" class="cssTable" border="0">
        <tr>
            <td class="cssPageTitleBG" colspan="3">
                <asp:Label ID="Label6" runat="server" CssClass="cssPageTitle" Text="Quản lý sử dụng sản phẩm" />
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:ValidationSummary ID="ValidationSummary2" runat="server" CssClass="cssManField"
                    Font-Bold="true" />
                <asp:Label ID="Label7" runat="server" CssClass="cssManField" />
            </td>
        </tr>
        <tr>
            <td style="width: 30%" valign="top">
                <table cellspacing="0" cellpadding="2" style="width: 100%;" class="cssTable" border="0">
                    <tr>
                        <td class="cssPageTitleBG" colspan="3">
                            <asp:Label ID="Label1" runat="server" CssClass="cssPageTitle" Text="Cây đơn vị sử dụng" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <asp:Label ID="Label2" runat="server" CssClass="cssManField" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <uc1:TreeViewControl ID="TreeViewControl1" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
            <td style="width: 70%" valign = "top">
                <table cellspacing="0" cellpadding="2" style="width: 100%;" class="cssTable" border="0">
                    <tr>
                        <td class="cssPageTitleBG" colspan="3">
                            <asp:Label ID="lblF221" runat="server" CssClass="cssPageTitle" Text="F221 - Thêm mới sản phẩm" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">                            
                            <asp:Label ID="m_lbl_mess" runat="server" CssClass="cssManField" />
                        </td>
                    </tr>
                    
                    <tr>
                        <td align="right" style="width: 15%;">
                            <asp:Label ID="lblFullName" CssClass="cssManField" runat="server" Text="Tên môn học (*)" />
                        </td>
                        <td style="width: 30%;">
                            <asp:DropDownList ID="cboMonHoc" runat="server" Width="250px" CssClass="cssDorpdownlist"   />
                        </td>
                        <td style="width: 5%;">                            
                        </td>
                    </tr>
                   
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblAnswer0" runat="server" CssClass="cssManField" Text="Mã mới(nếu có)" />
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtMaMoi" AccessKey="m" runat="server" Width="250px"   CssClass = "cssTextBox"/>                           
                        </td>
                        <td>
                            
                        </td>
                    </tr>
                    
                    <tr>
                        <td align="right">
                            &nbsp;
                        </td>
                        <td valign="top" colspan="2">
                            <asp:HiddenField ID="m_hdf_id_user_group" runat="server" Visible="False" />
                            <asp:HiddenField ID="m_hdf_pw" runat="server" Visible="False" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td colspan="2" align="left">
                            <asp:Button ID="m_cmd_tao_moi" AccessKey="c" CssClass="cssButton" runat="server"
                                Width="98px" Text="Tạo mới(c)" 
                                OnClientClick = "return CheckValidateVersion();" 
                                onclick="m_cmd_tao_moi_Click" />&nbsp;
                            <asp:Button ID="m_cmd_cap_nhat" AccessKey="u" CssClass="cssButton" runat="server"
                                Width="98px" Text="Cập nhật(u)" onclick="m_cmd_cap_nhat_Click" />&nbsp;
                            <asp:Button ID="btnCancel" AccessKey="r" CssClass="cssButton" runat="server" Width="98px"
                                Text="Xóa trắng(r)" Visible="False" />
                        </td>
                    </tr>
                    <tr>
                        <td class="cssPageTitleBG" colspan="3">
                            <asp:Label ID="lblMonHocInfo" runat="server" CssClass="cssPageTitle" Text="Danh sách môn học" />
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <asp:Label ID="m_lbl_thong_bao" Visible="false" runat="server" CssClass="cssManField" />
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>

                    <tr>
                        <td align="center" colspan="3" style="height: 450px;" valign="top">
                            <asp:GridView ID="gvDsMonHoc" runat="server" AutoGenerateColumns="False" Width="95%"
                                AllowPaging="True" Font-Size="10pt" CellPadding="4" ForeColor="#333333" 
                                CssClass="cssGrid" onrowcommand="gvDsMonHoc_RowCommand" 
                                onpageindexchanging="gvDsMonHoc_PageIndexChanging">
                                <FooterStyle BackColor="White" ForeColor="#000066" />
                                <RowStyle ForeColor="#000066" Height="5px" />
                                <Columns>
                                <asp:TemplateField HeaderText="Mã môn học mới">
                                        <ItemTemplate>
                                            <asp:Label ID="lblMaSanPhamNew" runat="server" Text='<%# Eval("MA_MON_HOC_MOI") %>'></asp:Label>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Left" BorderStyle="None" VerticalAlign="Middle" />
                                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Mã môn học">
                                        <ItemTemplate>
                                            <asp:Label ID="lblMaSanPham" runat="server" Text='<%# Eval("MA_MON_HOC") %>'></asp:Label>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Left" BorderStyle="None" VerticalAlign="Middle" />
                                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Tên tiếng Việt">
                                        <ItemTemplate>
                                            <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("TEN_TIENG_VIET") %>'></asp:Label>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Left" BorderStyle="None" VerticalAlign="Middle" />
                                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Tên tiếng Anh">
                                        <ItemTemplate>
                                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("TEN_TIENG_ANH") %>'></asp:Label>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Justify" BorderStyle="None" VerticalAlign="Middle" />
                                        <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" />
                                    </asp:TemplateField>
                                   
                                    <asp:BoundField DataField="GHI_CHU" HeaderText="Ghi chú">
                                        <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="120px" />
                                        <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="120px" />
                                    </asp:BoundField>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:ImageButton ID="imgBtEdit" runat="server" CommandArgument='<%# Eval("Id") %>'
                                                CommandName="EDIT" ImageUrl="~/Images/edit.gif" />
                                            <asp:ImageButton ID="imgBtDelete" runat="server" CommandArgument='<%# Eval("Id") %>'
                                                CommandName="DEL" ImageUrl="~/Images/delete.gif" />
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Left" Width="50px" />
                                        <ItemStyle HorizontalAlign="Left" Width="50px" />
                                    </asp:TemplateField>
                                </Columns>
                                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                <EditRowStyle BackColor="#7C6F57" />
                                <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#810c15" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#E3EAEB" />
                                <SelectedRowStyle CssClass="cssSelectedRow" BackColor="#C5BBAF" Font-Bold="True"
                                    ForeColor="#333333"></SelectedRowStyle>
                            </asp:GridView>                           
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>

